import request from '@/utils/request'

// 获取部门列表
export function departmentList(data) {
  return request({
    url: `sys/department/list`,
    method: 'post',
    data
  })
}

// 部门尽调模板创建
export function creatLookInfoModel(data) {
  return request({
    url: `/project-init/department/template/create`,
    method: 'post',
    data
  })
}

// 部门尽调模板编辑
export function editLookInfoModel(data) {
  return request({
    url: `/project-init/department/template/update`,
    method: 'put',
    data
  })
}

// 部门尽调模板列表
export function lookInfoModelList(data) {
  return request({
    url: `/project-init/department/template/list`,
    method: 'post',
    data
  })
}

// 部门尽调模板删除
export function lookInfoModelDelete(query) {
  return request({
    url: `/project-init/department/template/delete`,
    method: 'delete',
    params: query
  })
}

// 部门尽调模板详情
export function departmentModelDetail(query) {
  return request({
    url: `/project-init/department/template/detail`,
    method: 'get',
    params: query
  })
}
// 获取基础数据类型
export function baseTypeList() {
  return request({
    url: `/sys/dict/customer-type-list`,
    method: 'get'
  })
}
// 获取字典列表
export function getDictionary(data) {
  return request({
    url: '/sys/dict/list',
    method: 'post',
    data
  })
}
// 创建字典列表
export function createDiction(data) {
  return request({
    url: '/sys/dict/create',
    method: 'post',
    data
  })
}
// 编辑字典列表
export function removeDicction(data) {
  return request({
    url: '/sys/dict/update',
    method: 'put',
    data
  })
}
// 删除字典列表
export function deleteDicction(data) {
  return request({
    url: '/sys/dict/delete?id=' + data,
    method: 'delete'
  })
}

// 根据部门id获取该部门尽调须填写内容
export function labelInfo(params) {
  return request({
    url: '/project-init/department/template/label-info',
    method: 'get',
    params
  })
}
